use std::{clone, path::PathBuf};

#[derive(Debug,Clone)]
pub struct options {
    pub dir_path: PathBuf,

    pub data_file_size: u64,

    pub sync_writes: bool,

    pub index_type: IndexType,
}

#[derive(Debug,Clone)]
pub enum IndexType {
    BTree,
    SkipList,
}

impl Default for options {
    fn default() -> Self {
        Self { dir_path: std::env::temp_dir().join("db-test"), 
        data_file_size: 256*1024*1024,
        sync_writes: false, 
        index_type: IndexType::BTree 
        }
    }
}

pub struct IteratorOptions {
    pub prefix:Vec<u8>, // 用户指定前缀
    pub reverse: bool,  // 是否反向遍历
}

impl Default for IteratorOptions {
    fn default() -> Self {
        Self { prefix:Default::default(), reverse: false }
    }
}
